﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Frame.Lib.Core.Module;


public partial class Admin_Module_ShowIcon : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            ModuleBO module = new ModuleBO();
            DataTable dt = module.GetIcons();            

            dlIcon.DataSource = dt;
            dlIcon.DataBind();
        }
    }
    protected void dlIcon_ItemDataBound(object sender, DataListItemEventArgs e)
    {
        if (e.Item.ItemType == ListItemType.AlternatingItem || e.Item.ItemType == ListItemType.Item)
        {
            Image imgUrl = (Image)e.Item.FindControl("imgUrl");
            HiddenField hidUrl = (HiddenField)e.Item.FindControl("hidUrl");
            imgUrl.Style.Add("cursor", "pointer");
            imgUrl.Attributes.Add("onclick", "SaveIcon(this,'" + hidUrl.ClientID + "');");
        }
    }
}
